<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Closure</title>
  </head>
  <body></body>
  <script>
    function makePower(power) {
      return function (number) {
        return Math.pow(number, power)
      }
    }

    const power2 = makePower(2)
    const power3 = makePower(3)

    console.log('power2 >>> ', power2(2))
    console.log('power3 >>> ', power3(2))
  </script>
</html>
